package com.example.demo.function;

//import io.lettuce.core.RedisClient;
//import io.lettuce.core.RedisURI;
//import io.lettuce.core.TrackingArgs;
//import io.lettuce.core.api.StatefulRedisConnection;
//import io.lettuce.core.api.sync.RedisCommands;
//import io.lettuce.core.pubsub.RedisPubSubAdapter;
//import io.lettuce.core.pubsub.StatefulRedisPubSubConnection;
//import io.lettuce.core.pubsub.api.sync.RedisPubSubCommands;
//import io.lettuce.core.support.caching.CacheAccessor;
//import io.lettuce.core.support.caching.CacheFrontend;
//import io.lettuce.core.support.caching.ClientSideCaching;

import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;

/**
 * @program: demo
 * @description:
 * @author: zt22328 赵儒定
 * @create: 2022-04-26 14:54
 **/
public class FunctionTest {

    public static void main(String[] args) {

    }

    public static int function(int i, Function<Integer,Integer> function) {
        return function.apply(i);
    }

    public static void consumer(int i, Consumer<Integer> consumer) {
        consumer.accept(i);
    }

    public static int supplier(Supplier<Integer> function) {
        return function.get();
    }

    public static void runnable(Runnable runnable) {
        runnable.run();
    }

}
